#!/usr/bin/env python
# coding=utf-8

# File Name: getURL.py
# Author: Bill Zhang
# Mail: zchcandid@gmail.com 
# Created Time: Fri 29 Nov 2013 05:13:03 PM CST
from libGetURL import runUpdate
import time
i=1
ftimes=open("getURL_log","r")
times=int(ftimes.readline())+1
print(times)
ftimes.close()
while(i):
    Dbase="digikey"
    if(runUpdate(times,Dbase)==666):
        print("%s have been updated" % Dbase)
    times+=1
    print(times)
    if(times%30==0):
        time.sleep(1000)
    f=open('getURL_log',"w")
    f.write(str(times))
    f.close()
    
